package com.loukou.lkt.lkt.enums;

public enum SupplierTypeEnum {
	TYPE_Distribution(1,"经销"),
	TYPE_Consignment(2,"代销"),
	TYPE_Others(3,"其他");
	private int id;
	private String name;
	private SupplierTypeEnum(int id, String name) {
		this.id = id;
		this.name = name;
	}
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public static SupplierTypeEnum parseSupplierTypeEnum(int id) {
		for (SupplierTypeEnum typeEnum : SupplierTypeEnum.values()) {
			if(typeEnum.id == id){
				return typeEnum;
			}
		}
		return TYPE_Others;
	}
}
